package com.xindacloud.sms.console.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xindacloud.sms.console.system.dto.SearchSmsPricingDTO;
import com.xindacloud.sms.console.system.vo.SearchSmsPricingPageVO;
import com.xindacloud.sms.console.system.dto.SmsPricingDTO;
import com.xindacloud.sms.console.system.entity.SmsPricing;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 价格列表 Mapper 接口
 * </p>
 *
 * @author czc
 * @since 2019-10-08
 */

public interface SmsPricingMapper extends BaseMapper<SmsPricing> {

    @Select("SELECT uao.operator_id as operatorId FROM sms_user_allow_operator uao ,sms_pricing sp WHERE sp.operator_id=uao.operator_id")
    public List<SmsPricingDTO> getPriceListByOperator(SmsPricingDTO smsPricingDTO);


    IPage<SearchSmsPricingPageVO> selectPagePricingPageVo(Page page, @Param("searchSmsPricingDTO") SearchSmsPricingDTO searchSmsPricingDTO);
    
    IPage<SearchSmsPricingPageVO> selectSalesPagePricingPageVo(Page page, @Param("searchSmsPricingDTO") SearchSmsPricingDTO searchSmsPricingDTO);
    
}
